package com.sangeng.controller;

import com.sangeng.domin.ResponseResult;
import com.sangeng.domin.User;
import com.sangeng.services.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginUserController {

    @Autowired
    private UserService userService;



    @PostMapping("/user/login")
    public ResponseResult loginUser(@RequestBody User user){


        return userService.login(user);
    }
}
